<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="static/css/bootstrap.min.css" />
	<link rel="stylesheet" href="static/css/style.css" type="text/css" />
	<style type="text/css">
		#myModal{
			background-color:#fff;
		}
		
		body{
			background-image:url("static/img/bg_main.jpg");
		}
		
		#con{
			background-image:url("static/img/bg_nav.png");
			background-repeat:no-repeat no-repeat;
			background-position:right;
			
		}
		
		#liebiao:hover{
			-webkit-transform: scale(1.05);
  			-moz-transform: scale(1.05);
  			-o-transform: scale(1.05);
  			background:#3e3e3e;
  			
		}
		#liebiao:hover .wall p{
			color:#fff;
		}
		#liebiao:hover span{
			color:pink;
		}
		.navbar .nav{
			padding-right:200px;
			margin-top:8px;
		}
		.navbar ul li{
			margin-right:50px;
		}
		#liebiao{
			/* background-color:#b9b2a2; */
			background-color:#fff;
			filter:alpha(opacity=70);
			-moz-opacity:0.7;
			opacity:0.7; 
		}
	</style>
</head>
<body class="body">
	<div class="navbar navbar-fixed-top" id="navbar">
		<div class="navbar-innerv">
			<div class="container" id="con">
				<a href="main.jspx" class="brand"><p style="color:#0088cc;"><strong>凯胜项目管理系统</strong></p></a>
				<ul class="nav pull-right">
				  <li class="">
					<a href="#"><span>${user.userName }</span></a>
				  </li>
				   <li>
				 	 <c:if test="${user.userName eq 'admin'}">
				 	 <a data-toggle="modal" href="#myModal">
				 		<span>添加员工</span> 
				 	 </a>
				 	 </c:if>	
				 	 <c:if test="${!(user.userName eq 'admin')}">
				 	 <a data-toggle="modal" href="#myModal2">
				 		<span>上传头像</span> 
				 	 </a>
				 	 </c:if>	
				  </li>
				  <li><a href="stop.jspx"><span>退出</span></a></li>
				</ul>
			</div>
		</div>
	</div>
	<br><br><br>
	
	
	
	<div class="modal hide fade" id="myModal">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal">×</button>
					<h3>添加员工</h3>
					</div>
					<div class="modal-body">
						<form action="user.jspx?m=create" method="post" class="form-horizontal">
							<fieldset>
							<legend>upload</legend>
							<div class="control-group">
							  <label class="control-label" for="input01">用户名</label>
								<div class="controls">
									<input type="text" class="input-xlarge" id="input01" name="username"/>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" for="input02">用户密码</label>
								<div class="controls">
									<input type="password" class="input-xlarge" id="input02" name="password"/>
								</div>
							</div>
							
							<div class="modal-footer">
								<a href="#" class="btn" data-dismiss="modal">取消</a>
								<button type="submit" class="btn btn-primary">添加</button>
							</div>
						 </fieldset>
					</form>
			</div>
							
		</div>
	
	<div class="modal hide fade" id="myModal2">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal">×</button>
					<h3>添加头像</h3>
					</div>
					<div class="modal-body">
						<form action="user.jspx" method="post"  enctype="multipart/form-date" class="form-horizontal">
							<fieldset>
							<legend>upload</legend>
							
							<div class="control-group">
								<label class="control-label" for="input02">上传头像</label>
								<div class="controls">
									<input type="file" class="input-xlarge" id="input02" name="mydocument"/>
								</div>
							</div>
							
							<div class="modal-footer">
								<a href="#" class="btn" data-dismiss="modal">取消</a>
								<button type="submit" class="btn btn-primary">上传</button>
							</div>
						 </fieldset>
					</form>
			</div>
							
		</div>
	
	
	
	
	<div class="container">
	  <div class="row">
		<div class="span9">        
          	<div class="page-header">
          		<h2>项目列表</h2>
          	</div>
          	<a href="newproject.jspx" class="btmtn" style="font-size:18px;color:#2c2c2c;"><i class="icon-plus"></i><strong>开始一个新项目</strong></a>
          	
          	<c:if test="${fn:length(projectList)==0 }">
				还没有任何项目！
			</c:if>
         
          	<c:forEach items="${projectList }" var="project">
          	<div id="liebiao" style="border-radius:15px 15px 15px 15px;border:1px solid #fff;margin-top:20px;width:90%;margin-left:auto;margin-right:auto;">
			    <ul class="breadcru" style="margin-bottom:0px;border:0 none;margin-top:7px;background-color:transparent;">
					<li class="active">
						<a href="project.jspx?id=${project.id }" style="color:#0088cc;font-size:16px;"><i class="icon-th"></i><span>${project.projectName }</span></a>
					</li>
				</ul>
				<div class="wall">
					<br>
					<p style="font-size:14px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${project.projectContent }</p>
					<br>
				</div>
			</div>
			</c:forEach>
		</div>
		<div class="span3">
			<c:if test="${param.cod ==10001}">
				<div style="color:red;font-size:16px;">
					添加失败！
				</div><br>
			</c:if>
			<c:if test="${param.cod == 10002}">
				<div style="color:red;font-size:16px;">
						添加成功！
				</div><br>
			</c:if>
		</div>
	  </div>
	</div>
	<div style="margin-top:300px;clear:both;">
		<br>
	</div>
	
	<p id="back-top" style="padding-right:0px; display:block;">
		<a href="#top">
		<span><img src="static/img/fff.png"/></span>
		</a>
	</p>
	
	<script type="text/javascript" src="static/js/jquery.js"></script>
	<script type="text/javascript" src="static/js/bootstrap.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#showModel").click(function(){
				$("#myModal").modal();
			});
			$("#showModel").click(function(){
				$("#myModal2").modal();
			});
		});
	</script>
	
</body>
</html>